<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser</TargetFrameworks>
  </PropertyGroup>
  <PropertyGroup>
    <!-- SYSTEM_NET_PRIMITIVES_DLL is required to allow source-level code sharing for types defined within the
         System.Net.Internals namespace. -->
    <DefineConstants>$(DefineConstants);SYSTEM_NET_PRIMITIVES_DLL</DefineConstants>
  </PropertyGroup>
  <!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
  <ItemGroup>
    <DefaultReferenceExclusion Include="System.Net.Primitives" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\..\src\System\Net\Sockets\AddressFamily.cs"
             Link="ProductionCode\System\Net\Sockets\AddressFamily.cs" />
    <Compile Include="..\..\src\System\Net\Sockets\SocketError.cs"
             Link="ProductionCode\System\Net\Sockets\SocketError.cs" />
    <Compile Include="..\..\src\System\Net\IPAddress.cs"
             Link="ProductionCode\System\Net\IPAddress.cs" />
    <Compile Include="..\..\src\System\Net\IPAddressParser.cs"
             Link="ProductionCode\System\Net\IPAddressParser.cs" />
    <Compile Include="$(CommonPath)System\Net\IPv4AddressHelper.Common.cs"
             Link="ProductionCode\System\Net\IPv4AddressHelper.Common.cs" />
    <Compile Include="$(CommonPath)System\Net\IPv6AddressHelper.Common.cs"
             Link="ProductionCode\System\Net\IPv6AddressHelper.Common.cs" />
    <Compile Include="..\..\src\System\Net\IPEndPoint.cs"
             Link="ProductionCode\System\Net\IPEndPoint.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddress.cs"
             Link="Common\System\Net\SocketAddress.cs" />
    <Compile Include="..\..\src\System\Net\EndPoint.cs"
             Link="ProductionCode\System\Net\EndPoint.cs" />
    <Compile Include="$(CommonPath)System\Text\StringBuilderCache.cs"
             Link="ProductionCode\Common\System\Text\StringBuilderCache.cs" />
    <Compile Include="$(CommonPath)System\HexConverter.cs"
             Link="Common\System\HexConverter.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
    <Compile Include="$(CommonPath)System\Net\IPEndPointExtensions.cs"
             Link="Common\System\Net\IPEndPointExtensions.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddressExtensions.cs"
             Link="Common\System\Net\SocketAddressExtensions.cs" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="HostInformationPalTest.cs" />
    <Compile Include="SocketAddressPalTest.cs" />
    <Compile Include="Fakes\NetEventSource.cs" />
    <Compile Include="..\..\src\System\Net\SocketException.cs"
             Link="ProductionCode\System\Net\SocketException.cs" />
    <Compile Include="$(CommonPath)System\Net\InternalException.cs"
             Link="ProductionCode\Common\System\Net\InternalException.cs" />
    <Compile Include="$(CommonPath)System\Net\IPAddressParserStatics.cs"
             Link="ProductionCode\Common\System\Net\IPAddressParserStatics.cs" />
    <Compile Include="$(CommonPath)System\Net\TcpValidationHelpers.cs"
             Link="ProductionCode\Common\System\Net\TcpValidationHelpers.cs" />
    <Compile Include="$(CommonPath)System\NotImplemented.cs"
             Link="ProductionCode\Common\System\NotImplemented.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.ErrorCodes.cs"
             Link="ProductionCode\Common\Interop\Windows\WinSock\Interop.ErrorCodes.cs" />
  </ItemGroup>
  <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' ">
    <Compile Include="..\..\src\System\Net\SocketException.Windows.cs"
             Link="ProductionCode\System\Net\SocketException.Windows.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddressPal.Windows.cs"
             Link="Common\System\Net\SocketAddressPal.Windows.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Windows.cs"
             Link="Common\System\Net\NetworkInformation\HostInformationPal.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs"
             Link="Common\Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="ProductionCode\Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\NtDll\Interop.NtStatus.cs"
             Link="ProductionCode\Common\Interop\Windows\NtDll\Interop.NtStatus.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Windows.cs"
             Link="ProductionCode\System\Net\NetworkInformation\InterfaceInfoPal.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs"
             Link="ProductionCode\Common\Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser'">
    <Compile Include="..\..\src\System\Net\SocketException.Unix.cs"
             Link="ProductionCode\System\Net\SocketException.Unix.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddressPal.Unix.cs"
             Link="Common\System\Net\SocketAddressPal.Unix.cs" />
    <Compile Include="$(CommonPath)System\Net\Sockets\SocketErrorPal.Unix.cs"
             Link="Common\System\Net\Sockets\SocketErrorPal.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Errors.cs"
             Link="ProductionCode\Interop\Unix\Interop.Errors.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
             Link="ProductionCode\Common\Interop\Unix\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.IPAddress.cs"
             Link="ProductionCode\Common\Interop\Unix\System.Native\Interop.IPAddress.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SocketAddress.cs"
             Link="ProductionCode\Common\Interop\Unix\System.Native\Interop.SocketAddress.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix'">
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Unix.cs"
             Link="Common\System\Net\NetworkInformation\HostInformationPal.Unix.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs"
             Link="Common\System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetDomainName.cs"
             Link="Common\Interop\Unix\System.Native\Interop.GetDomainName.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetHostName.cs"
             Link="Common\Interop\Unix\System.Native\Interop.GetHostName.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetNameInfo.cs"
             Link="Common\Interop\Unix\System.Native\Interop.GetNameInfo.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.HostEntry.cs"
             Link="Common\Interop\Unix\System.Native\Interop.HostEntry.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs"
             Link="Common\Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'browser'">
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Browser.cs"
             Link="Common\System\Net\NetworkInformation\HostInformationPal.Browser.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Browser.cs"
             Link="ProductionCode\Common\System\Net\NetworkInformation\InterfaceInfoPal.Browser.cs" />
  </ItemGroup>
</Project>
